package bluejack.operation;

/**
 * ...
 * @author BlueJack
 */

class CheckOper extends RetryOper
{
	public var check:Void->Bool;

	public function new(check:Void->Bool) {
		this.check = check;
		super();
		timeout = 1;
		maxRetry = 3;
	}
	
	override public function execute():Void {
		if ( check() ) result();
		super.execute();
	}
}